import torch
from iou import iou_cuda, iou_cplus, iou_cpu, iou_cpu2

device = torch.device('cuda:0')
input1 = torch.Tensor([[0, 0, 1, 1],
                       [0, 2, 1, 3],
                       [0.2, 0, 1, 1],
                       [0.1, 2, 1, 3],
                       [0.11, 0, 1, 1],
                       [0, 2.4, 1, 3],
                       [0.2, 0.1, 1, 1],
                       [0.7, 2.5, 1, 3],
                       [0, 0, 6, 1],
                       [1.5, 2, 1, 3]]).to(device)
input2 = torch.Tensor([[0.5, 0, 1.5, 1],
                       [0, 0.5, 1, 1.5],
                       [0.5, 0.5, 1.5, 1.5],
                       [0, 0.5, 1, 2.5]]).to(device)


result = iou_cuda(input1, input2)


result4 = iou_cplus(input1.cpu(), input2.cpu())


result2 = iou_cpu(input1, input2)

result2 = iou_cpu(input1.to('cpu'), input2.to('cpu'))

result3 = iou_cpu2(input1.to('cpu'), input2.to('cpu'))
pass
